package com.ifox.hgx.spring.annotation.dao;

import com.ifox.hgx.spring.annotation.bean.Person;
import org.springframework.stereotype.Repository;

import java.time.Instant;
import java.util.Date;

@Repository
public class PersonRepository {

    private Integer index = 0 ;

    public Person getById(Integer id) {
        return new Person(id, "哈哈哈", "1231232132", Date.from(Instant.now()));
    }

    public Integer getIndex() {
        return index;
    }

    public void setIndex(Integer index) {
        this.index = index;
    }

    @Override
    public String toString() {
        return "PersonRepository{" +
                "index=" + index +
                '}';
    }
}
